package net.zjitc.mapper;

import net.zjitc.pojo.OrdersItem;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Administrator on 2018/1/3.
 */
public interface OrderItemAnnotationMapper {

    //通过订单id查询所有的订单详情
    @Select("select *from orderitems where orders_id=#{id}")
    @Results({
            @Result(id=true,column = "id",property = "id"),
            @Result(column = "orders_id",property = "orders_id"),
            @Result(column = "items_id",property = "items_id"),
            @Result(column = "items_num",property = "items_num")
    })
    List<OrdersItem> findOrdersItemsByOid(int id);
}
